<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>测试报告</title>
    <meta name="generator" content="HTMLTestRunner 0.8.3"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    
<style type="text/css" media="screen">
body        { font-family: Microsoft YaHei,Tahoma,arial,helvetica,sans-serif;padding: 20px; font-size: 100%; }
table       { font-size: 100%; }
/* -- heading ---------------------------------------------------------------------- */
.heading {
    margin-top: 0ex;
    margin-bottom: 1ex;
}
.heading .description {
    margin-top: 4ex;
    margin-bottom: 6ex;
}
/* -- report ------------------------------------------------------------------------ */
#total_row  { font-weight: bold; }
.passCase   { color: #5cb85c; }
.failCase   { color: #FFA500; font-weight: bold; }
.errorCase  { color: #DC143C; font-weight: bold; }
.hiddenRow  { display: none; }
.testcase   { margin-left: 2em; }
</style>

</head>
<body >
<div class='heading'>
<h1 style="font-family: Microsoft YaHei">测试报告</h1>
<p class='attribute'><strong>测试人员 : </strong> 李中华</p>
<p class='attribute'><strong>开始时间 : </strong> 2021-08-20 23:20:33</p>
<p class='attribute'><strong>合计耗时 : </strong> 0:00:12.495796</p>
<p class='attribute'><strong>测试结果 : </strong> 共 3，失败 3，通过率= 0.00%</p>

<p class='description'>眸视科技web接口测试报告</p>
</div>


<p id='show_detail_line'>
<a class="btn btn-primary" href='javascript:showCase(4)'>概要{ 0.00% }</a>
<a class="btn btn-success" href='javascript:showCase(0)'>通过{ 0 }</a>
<a class="btn btn-danger" href='javascript:showCase(2)'>失败{ 3 }</a>
<a class="btn btn-warning" href='javascript:showCase(1)'>异常{ 0 }</a>
<a class="btn btn-info" href='javascript:showCase(3)'>所有{ 3 }</a>
</p>
<table id='result_table' class="table table-condensed table-bordered table-hover">
<colgroup>
<col align='left' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
</colgroup>
<tr id='header_row' class="text-center active" style="font-weight: bold;font-size: 14px;">
    <td>用例编号/用例名称</td>
    <td>总计</td>
    <td>通过</td>
    <td>异常</td>
    <td>失败</td>
    <td>详细</td>
</tr>

<tr class='danger'>
    <td>TestCase_0</td>
    <td class="text-center">1</td>
    <td class="text-center">0</td>
    <td class="text-center">0</td>
    <td class="text-center">1</td>
    <td class="text-center"><a href="javascript:showClassDetail('c1',1)" class="detail" id='c1'>详细</a></td>
</tr>

<tr id='et1_1' class='none'>
    <td class='errorCase'><div class='testcase'>testcase</div></td>
    <td colspan='5' align='center'>
    <!--默认收起output信息 - 
    <button id='btn_et1_1' type="button"  class="btn-xs collapsed" data-toggle="collapse" data-target='#div_et1_1'>失败</button>
    <div id='div_et1_1' class="collapse" align='left'>  -->
    <!-- 默认展开output信息 -  -->
    <button id='btn_et1_1' type="button"  class="btn-xs" data-toggle="collapse" data-target='#div_et1_1'>失败</button>
    <div id='div_et1_1' class="collapse in" align='left'>
    <pre>
    
et1_1: 2021-08-20 23:20:36,316 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 异常信息:HTTPSConnectionPool(host='chenguang.cloud', port=8080): Max retries exceeded with url: /auth/login (Caused by NewConnectionError('&lt;urllib3.connection.HTTPSConnection object at 0x000002465812F730&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝，无法连接。'))
2021-08-20 23:20:36,317 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 1.0:报表查询
&lt;class 'str'&gt;
2021-08-20 23:20:36,318 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 完结
Traceback (most recent call last):
  File "D:\TD测试\我自己的接口测试\mskjInterface\testcase\TestCase.py", line 53, in testcase
    CheckResult().checkResult(self.session,self.headers_token,self.url,self.datatype,self.method,self.code_suc,self.param)
AttributeError: 'TestCase_0' object has no attribute 'headers_token'


    </pre>
    </div>
    </td>
</tr>

<tr class='danger'>
    <td>TestCase_1</td>
    <td class="text-center">1</td>
    <td class="text-center">0</td>
    <td class="text-center">0</td>
    <td class="text-center">1</td>
    <td class="text-center"><a href="javascript:showClassDetail('c2',1)" class="detail" id='c2'>详细</a></td>
</tr>

<tr id='et2_1' class='none'>
    <td class='errorCase'><div class='testcase'>testcase</div></td>
    <td colspan='5' align='center'>
    <!--默认收起output信息 - 
    <button id='btn_et2_1' type="button"  class="btn-xs collapsed" data-toggle="collapse" data-target='#div_et2_1'>失败</button>
    <div id='div_et2_1' class="collapse" align='left'>  -->
    <!-- 默认展开output信息 -  -->
    <button id='btn_et2_1' type="button"  class="btn-xs" data-toggle="collapse" data-target='#div_et2_1'>失败</button>
    <div id='div_et2_1' class="collapse in" align='left'>
    <pre>
    
et2_1: 2021-08-20 23:20:39,580 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 异常信息:HTTPSConnectionPool(host='chenguang.cloud', port=8080): Max retries exceeded with url: /auth/login (Caused by NewConnectionError('&lt;urllib3.connection.HTTPSConnection object at 0x000002465812FA90&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝，无法连接。'))
2021-08-20 23:20:39,588 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 2.0:报表查询
&lt;class 'str'&gt;
2021-08-20 23:20:39,589 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 完结
Traceback (most recent call last):
  File "D:\TD测试\我自己的接口测试\mskjInterface\testcase\TestCase.py", line 53, in testcase
    CheckResult().checkResult(self.session,self.headers_token,self.url,self.datatype,self.method,self.code_suc,self.param)
AttributeError: 'TestCase_1' object has no attribute 'headers_token'


    </pre>
    </div>
    </td>
</tr>

<tr class='danger'>
    <td>TestCase_2</td>
    <td class="text-center">1</td>
    <td class="text-center">0</td>
    <td class="text-center">0</td>
    <td class="text-center">1</td>
    <td class="text-center"><a href="javascript:showClassDetail('c3',1)" class="detail" id='c3'>详细</a></td>
</tr>

<tr id='et3_1' class='none'>
    <td class='errorCase'><div class='testcase'>testcase</div></td>
    <td colspan='5' align='center'>
    <!--默认收起output信息 - 
    <button id='btn_et3_1' type="button"  class="btn-xs collapsed" data-toggle="collapse" data-target='#div_et3_1'>失败</button>
    <div id='div_et3_1' class="collapse" align='left'>  -->
    <!-- 默认展开output信息 -  -->
    <button id='btn_et3_1' type="button"  class="btn-xs" data-toggle="collapse" data-target='#div_et3_1'>失败</button>
    <div id='div_et3_1' class="collapse in" align='left'>
    <pre>
    
et3_1: 2021-08-20 23:20:45,520 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 异常信息:HTTPSConnectionPool(host='chenguang.cloud', port=8080): Max retries exceeded with url: /auth/login (Caused by NewConnectionError('&lt;urllib3.connection.HTTPSConnection object at 0x00000246581E8C10&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝，无法连接。'))
2021-08-20 23:20:45,521 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 3.0:任务管理-新增任务
&lt;class 'str'&gt;
2021-08-20 23:20:45,522 - D:\TD测试\我自己的接口测试\mskjInterface\common\logger.py[line:52] - INFO : 完结
Traceback (most recent call last):
  File "D:\TD测试\我自己的接口测试\mskjInterface\testcase\TestCase.py", line 53, in testcase
    CheckResult().checkResult(self.session,self.headers_token,self.url,self.datatype,self.method,self.code_suc,self.param)
AttributeError: 'TestCase_2' object has no attribute 'headers_token'


    </pre>
    </div>
    </td>
</tr>

<tr id='total_row' class="text-center info">
    <td>总计</td>
    <td>3</td>
    <td>0</td>
    <td>0</td>
    <td>3</td>
    <td>通过率：0.00%</td>
</tr>
</table>

<div id='ending'>&nbsp;</div>
    <div style=" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer">
    <a href="#"><span class="glyphicon glyphicon-eject" style = "font-size:30px;" aria-hidden="true">
    </span></a></div>
    
<script language="javascript" type="text/javascript">
output_list = Array();
// 修改按钮颜色显示失败问题 --  v0.8.2.3
$("button[id^='btn_pt']").addClass("btn btn-success");
$("button[id^='btn_et']").addClass("btn btn-danger");
$("button[id^='btn_ft']").addClass("btn btn-warning");
/*level
增加分类并调整，增加error按钮事件 --  v0.8.2.3
0:Pass    //pt none, ft hiddenRow, et hiddenRow
1:Failed  //pt hiddenRow, ft none, et hiddenRow
2:Error    //pt hiddenRow, ft hiddenRow, et none
3:All     //pt none, ft none, et none
4:Summary //all hiddenRow
*/
//add Error button event --  v0.8.2.3
function showCase(level) {
    trs = document.getElementsByTagName("tr");
    for (var i = 0; i < trs.length; i++) {
        tr = trs[i];
        id = tr.id;
        if (id.substr(0,2) == 'ft') {
            if (level == 0 || level == 2 || level == 4 ) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
        if (id.substr(0,2) == 'pt') {
            if (level == 1 || level == 2 || level == 4) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
        if (id.substr(0,2) == 'et') {
            if (level == 0 || level == 1 || level == 4) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
    }
    //加入【详细】切换文字变化 -- 
    detail_class=document.getElementsByClassName('detail');
	//console.log(detail_class.length)
	if (level == 3) {
		for (var i = 0; i < detail_class.length; i++){
			detail_class[i].innerHTML="收起"
		}
	}
	else{
			for (var i = 0; i < detail_class.length; i++){
			detail_class[i].innerHTML="详细"
		}
	}
}
//add Error button event --  v0.8.2.3
function showClassDetail(cid, count) {
    var id_list = Array(count);
    var toHide = 1;
    for (var i = 0; i < count; i++) {
        tid0 = 't' + cid.substr(1) + '_' + (i+1);
        tid = 'f' + tid0;
        tr = document.getElementById(tid);
        if (!tr) {
            tid = 'p' + tid0;
            tr = document.getElementById(tid);
        }
        if (!tr) {
            tid = 'e' + tid0;
            tr = document.getElementById(tid);
        }
        id_list[i] = tid;
        if (tr.className) {
            toHide = 0;
        }
    }
    for (var i = 0; i < count; i++) {
        tid = id_list[i];
        //修改点击无法收起的BUG，加入【详细】切换文字变化 -- 
        if (toHide) {
            document.getElementById(tid).className = 'hiddenRow';
            document.getElementById(cid).innerText = "详细"
        }
        else {
            document.getElementById(tid).className = '';
            document.getElementById(cid).innerText = "收起"
        }
    }
}
function html_escape(s) {
    s = s.replace(/&/g,'&amp;');
    s = s.replace(/</g,'&lt;');
    s = s.replace(/>/g,'&gt;');
    return s;
}
</script>
</body>
</html>
